# -*- coding:UTF-* -*-
def removeDuplicates(self, A):
    # write your code here
    if A == []:
        return 0
    count = 0
    length=len(A)
    i=0
    while i<length-1:
        if A[i]==A[i+1]:
            del A[i+1]
            length-=1
        else:
            i+=1
    return length
print removeDuplicates("",[1,1,2])